home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 2.iso / Pc / P_R / P2DOSPTC.ZIP / PATCH2.BAT < prev    next >
DOS Batch File  |  1997-01-16  |  6KB  |  258 lines

  1. @echo off
  2.  
  3. REM Which type of install?
  4. :installType
  5. cls
  6. echo.
  7. echo You may wish to use some hard disk space to enhance
  8. echo game play.  Choosing the 15 or 23 meg options will 
  9. echo speed up the time between room changes. Please select 
  10. echo how much hard disk space you would like to use:
  11. echo.
  12. echo Small:  10 megs (Required)
  13. echo.
  14. echo Medium: 15 megs
  15. echo. 
  16. echo Larger: 23 megs 
  17. echo. 
  18. echo Exit:       Cancel Installation
  19. echo.  
  20. echo Enter selection (S/M/L/E) 
  21. REM pick smle small medium large noInstall
  22. choice /c:smle /n
  23. if errorlevel 5 goto installtype
  24. if errorlevel 4 goto noinstall
  25. if errorlevel 3 goto large
  26. if errorlevel 2 goto medium
  27. if errorlevel 1 goto small
  28. goto noinstall
  29.  
  30. :large
  31. cls
  32. REM space %1: 23000 noLargespace
  33. what k %1
  34. if not errorlevel 23 goto noLargespace
  35.  
  36. REM godir %1:%4 cantcreate
  37. %1:
  38. cd %4
  39.  
  40. echo Copying files to %1:%4
  41. echo.
  42. echo Copying %2:ressci.lrg to %1:ressci.lrg...
  43. %2:copymegs %2:ressci.lrg %1:ressci.lrg 23 X    >nul
  44. echo Copying %2:ressci.med to %1:ressci.med...
  45. %2:copymegs %2:ressci.med %1:ressci.med 23 X    >nul
  46. goto smallFinish
  47.  
  48. :medium
  49. cls
  50. REM space %1: 15000 noMediumspace
  51. what k %1
  52. if not errorlevel 15 goto noMediumspace
  53.  
  54. REM godir %1:%4 cantcreate
  55. %1:
  56. cd %4
  57.  
  58. echo Copying files to %1:%4
  59. echo.
  60. echo Copying %2:ressci.med to %1:ressci.med...
  61. %2:copymegs %2:ressci.med %1:ressci.med 10 X >nul
  62. goto smallFinish
  63.  
  64. :small
  65. cls
  66. REM space %1: 10000 nospace
  67. what k %1
  68. if not errorlevel 10 goto nospace
  69.  
  70. REM godir %1:%4 cantcreate
  71. %1:
  72. cd %4
  73.  
  74. echo Copying files to %1:%4
  75. echo.
  76.  
  77. :smallFinish
  78. copy %2:cdcheck.bat                     %1:checkcd.bat
  79. copy %2:*.drv                                   %1:
  80.  
  81. copy %2:version                                 %1:
  82. copy %2:sierra.err                      %1:
  83.  
  84. copy %2:ressci.pat                      %1:
  85. copy %2:resmdt.pat                      %1:
  86. copy %2:resmap.pat                      %1:
  87.  
  88. copy %2:DUKDLL95.DLL            %1:
  89. copy %2:997.v56                         %1:
  90. copy %2:998.v56                         %1:
  91. copy %2:999.v56                         %1:
  92. copy %2:999.CLU                         %1:
  93. copy %2:63007.CSC                       %1:
  94. copy %2:64978.CSC                       %1:
  95. copy %2:64990.CSC                       %1:
  96. copy %2:63001.CSC                       %1:
  97. copy %2:62999.CSC                       %1:
  98. copy %2:4051.CSC            %1:
  99. copy %2:0.CSC                           %1:
  100.  
  101. REM apply the patches
  102. REM copy %5\*.*                             %1:
  103. echo.
  104. echo Updating files for DOS version...
  105. echo.
  106. %5\patchit %5\p2.rtp >nul
  107. echo.
  108. echo Update complete.
  109. echo.
  110.  
  111. echo @echo off                          >p2dos.bat
  112. echo  cd %1:%4                         >>p2dos.bat
  113. echo  call CheckCD %2                  >>p2dos.bat
  114. echo  %1:%4\sierra %1:%4\resource.cfg  >>p2dos.bat
  115.  
  116. copy p2dos.bat ..\p2dos.bat
  117. echo cd ..                                                              >>..\p2dos.bat
  118.  
  119. echo cdSpeed=2                                  >>resource.cfg
  120. echo resAUD=CD:\                                >>resource.cfg
  121. echo resSFX=CD:\                                >>resource.cfg
  122. echo resMAP=CD:\;%1:%4                          >>resource.cfg
  123. echo rescdisc=CD:\                              >>resource.cfg
  124. echo patchDir=%1:%4;CD:\patches;CD:\               >>resource.cfg
  125. echo movieDir=CD:\duk                           >>resource.cfg
  126. echo palette=CD:\duk                                    >>resource.cfg
  127. echo discID=RESSCI                                                              >>resource.cfg
  128. echo CD:=%2:                                                                    >>resource.cfg
  129.  
  130. REM Test for vesa support 
  131. REM godir %1:%4
  132. %1:
  133. cd %4
  134.  
  135. havevesa.exe
  136. if ERRORLEVEL 1 goto novesa
  137. goto done
  138.  
  139. REM Offer to create Universal Vesa Driver.
  140. :novesa
  141. cls
  142. echo.
  143. echo VESA support has not been detected. However you do 
  144. echo have the option of constructing a universal VESA 
  145. echo driver.
  146. echo.
  147. echo Creating the universal VESA driver will not work 
  148. echo for every computer system and/or video card.  If 
  149. echo this function fails, you may have to contact your 
  150. echo video card manufacturer for a VESA driver that will 
  151. echo work for you.  Please consult the README file for 
  152. echo more information.
  153. echo.  
  154. echo Would you like to attempt this now? (Y/N) 
  155. REM pick yn univesa done
  156. choice /n
  157. if errorlevel 3 goto novesa
  158. if errorlevel 2 goto done
  159. if errorlevel 1 goto univesa
  160. goto done
  161.  
  162. :univesa
  163. cls
  164. echo Warning... Performing this function may cause your computer to lock.
  165. echo If this occurs, restart your computer, re-run the Patch install program,
  166. echo and select NO for attempting to create the universal driver.
  167. uvconfig.exe -gen
  168. if exist univbe.drv goto success
  169. cls
  170. echo ERROR: Universal VESA driver not created.
  171. goto done
  172.  
  173. :success
  174. cls
  175. echo.
  176. echo    A Universal VESA driver was successfully created. 
  177. echo.
  178. echo.
  179. echo.
  180. echo. 
  181. echo.
  182. echo.
  183. echo.
  184. echo.
  185. echo.
  186. echo.
  187. echo.
  188. echo.
  189. echo.
  190. pause
  191.  
  192. :done
  193. cls
  194. echo.
  195. echo  To play Phantasmagoria: A Puzzle of Flesh now:
  196. echo     At the DOS prompt, 
  197. echo     type P2DOS and press [ENTER].
  198. echo.
  199. echo  To play Phantasmagoria: A Puzzle of Flesh later:
  200. echo     From the directory of %1:%4,
  201. echo     type P2DOS and press [ENTER].
  202. echo.
  203. pause
  204. goto end
  205.  
  206. :cantcreate
  207. echo Unable to create directory %1:%4
  208. pause
  209. set patcherr=error creating install directory.
  210. goto end
  211.  
  212. :nospace
  213. cls
  214. echo.
  215. echo There is not enough space on %1: to install. 
  216. echo A minimum of 10 Megabytes of disk space is necessary in
  217. echo order to install the game.
  218. echo.
  219. pause
  220. set patcherr=need at least 10mb on the hard drive.
  221. goto end
  222.  
  223. :noMediumspace
  224. cls
  225. echo.
  226. echo There is not enough space on %1: to install. 
  227. echo At least 15 Megabytes of disk space is necessary in
  228. echo order to install the game.
  229. echo.
  230. pause
  231. set patcherr=need 15mb for medium install.
  232. goto end
  233.  
  234. :noLargespace
  235. cls
  236. echo.
  237. echo There is not enough space on %1: to install. 
  238. echo At least 23 Megabytes of disk space is necessary in
  239. echo order to install the game.
  240. echo.
  241. pause
  242. set patcherr=need 23mb for large install.
  243. goto end
  244.  
  245. :noInstall
  246. cls
  247. patcherr=user_aborted
  248. goto end
  249.  
  250. :end
  251. rem -----------
  252. set p2instdir=
  253. set p2destdrive=
  254. set p2sourcedrive=
  255. set p2destpath=
  256. set patcherr=
  257. rem -----------
  258.